<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js21_event.js"></script>
    <style>
        button{
            margin:2rem;
        }
    </style>
</head>
<body>
    <h1>浏览器中的事件</h1>
    <button class="btn1" onclick="bgChange()">内联事件属性，随机改变颜色</button>
    <button class="btn2" onclick="bgChange()">事件处理器的属性-随机改变背景颜色</button>
    <button class="btn3" onclick="bgChange()">事件处理器函数-随机改变背景颜色</button>
</body>
</html>